import * as types from './types'
export function add(n){

  return {type:types.ADD,num:n}
}
export function minus(n){
  // setTimeout(() => {
  //   // return {type:types.MINUS,num:n}
  // }, 2000);
  // return {type:types.MINUS,num:n}
  return function (dispatch,getState){
    console.log(getState())
    setTimeout(() => {
      dispatch({type:types.MINUS,num:n})
    }, 3000);
  }
}